package edu.zut.hb.software.knowledge.service.impl;


import edu.zut.hb.software.base.service.impl.GenericTreeManagerImpl;
import edu.zut.hb.software.knowledge.domain.KnowledgeGroup;
import edu.zut.hb.software.knowledge.dao.KnowledgeGroupDao;
import edu.zut.hb.software.knowledge.service.KnowledgeGroupService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;
import java.util.ArrayList;
import java.util.List;

@Service
@Transactional
public class KnowledgeGroupServiceImpl extends GenericTreeManagerImpl<KnowledgeGroup, Long>
        implements KnowledgeGroupService {


    KnowledgeGroupDao knowledgegroupDao;

    @Autowired
    public void KnowledgeGroupDao(KnowledgeGroupDao knowledgegroupDao) {
        this.knowledgegroupDao = knowledgegroupDao;
        this.treeDao=knowledgegroupDao;
        this.dao=treeDao;
    }

    @Override
        public List list() {
            List list = new ArrayList();
            for (int i = 0; i < 100; i++) {
                KnowledgeGroup knowledgegroup = new KnowledgeGroup();
                knowledgegroup.setName("名称"+i);
                knowledgegroup.setAddress("地址"+i);
                knowledgegroup.setPhone("号码"+i);
                list.add(knowledgegroup);
            }
            return list;

        }




}
